<?php

class Notification_AcceptFriend extends Notification{
	
	private $notification_type;
	public static $messageTitle = "Un/plusieurs de vos demandes d'ajouts d'amis a/ont été accepté";
	
	public function __construct($map){
		parent::__construct($map);
		$this->notification_type = DEMANDE_AJOUT_AMI_ACCEPTEE;
	}	
		
	public function getNotificationType(){
		return $this->notification_type;
	}
	
	public function getUserSubjectMsg(){
		return "utilisateur ajouté à votre liste d'amis";
	}
	
	public function getMessageTitle(){
		return self::$messageTitle;
	}
	
	public function getNotificationMsg($date=false){
		$date = $date ? "<span class=\"notifDate\">".Outils_Date::relativeTime(strtotime($this->time)) . "</span>" : ""; 
		$user_subject = User_Bd::getUser($this->id_user_subject);
		return "<li class=\"notificationL userL\"><a href=\"#\" class=\"username\" title=\"Voir le profil de {$user_subject->getName()}\">{$user_subject->getName()}</a> a accepté votre demande d'ajout à votre liste d'amis <a href=\"#\" class=\"delNotification\">Ok</a><input type=\"hidden\" class=\"idNotification\" value=\"{$this->getIdNotification()}\" />{$date}<input type=\"hidden\" class=\"idUser\" value=\"{$this->getIdUserSubject()}\" /></li>";
	}
			
}


?>